package wzc.design_pattern.behaviour.chain;

/**
 * @Author 那和不是个啥
 * @Date 2025/7/20
 * @Description
 */

public class Director extends LeaveHandler {
    @Override
    public void handleRequest(int leaveDays) {
        if (leaveDays <= 7) {
            System.out.println("总监批准 " + leaveDays + " 天假期。");
        } else if (nextHandler != null) {
            nextHandler.handleRequest(leaveDays);
        }
    }
}
